﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
	<title>Anolis Resourcer Help</title>
	<style type="text/css">

body {
	font-family: sans-serif;
}

h1, h2, h3 {
	border: 1px solid #638ADA;
	background: #4166B1;
	color: #FFF;
	
	padding: 0.25em; }
	
h2 {
	background: #547BC7;
	margin-left: 1em; }
h3 {
	background: #7198E9;
	margin-left: 3em; }

div.section {
	margin-left: 4em; }
	
dt { font-style: italic; }

pre, code { border: 1px outset #97BEFF; }

table {
	width: 100%; }
th {
	background: #D5E5FF; }
td {
	padding: 0.2em;
	background: #F2F4F4; }

	</style>
</head>
<body>
	
	<h1>Anolis Resourcer Help</h1>
	
	<h2>Contents</h2>
	<div class="section">
		
		<ul>
			<li><a href="#what">What is Resourcer?</a></li>
			<li><a href="#faq">FAQ</a></li>
			<li><a href="#cli">Command-Line Reference</a></li>
			<li><a href="#links">Links and Feedback</a></li>
		</ul>
	</div>
	
	<h2 id="what">What is Resourcer?</h2>
	<div class="section">
		
		<p>Windows executables (or more specifically, Win32 PE files) often contain a small database of resources, these are graphics files, text strings, icons, and other programming paraphernalia. Often it can be advantageous to modify these resources, such as to modify a program's visual appearance or to correct a mistranslation in a string table. Anolis Resourcer is a "resource hacker" program which enables you to do this.</p>
		<p>Resourcer also supports *.RES files, which is useful for native Win32 developers.</p>
	</div>
	
	<h3>Key Features</h3>
	<div class="section">
	
		<dl>
			<dt>Batch Export</dt>
			<dd>
				<p>Extract all resources (or just "visual" resources) from a single file, or a directory full of executables in a couple of mouse-clicks. Select the "Batch Export" menu item under Tools or the Open Button's side menu.</p>
			</dd>
			<dt>Thumbnail View</dt>
			<dd>
				<p>See all the visual resources (icons, bitmaps, PNGs, etc) at a glance without having to extract them. Three thumbnail sizes available (16x16, 32x32, and 96x96)</p>
			</dd>
			<dt>Intelligent Icon Replacement</dt>
			<dd>
				<p>Icon resources are stored in two places: the "directory" containing references to sub-images is stored in the Icon Directory resource, and the actual images that make up an icon are stored in the Icon Images area.</p>
				<p>Most resource editors delete the old subimages before adding new ones and overwriting the directory. Resourcer has the option to "merge" icons instead, so you end up with the union of the original icon and the new file's icon.</p>
			</dd>
			<dt>Vista MUI Aware</dt>
			<dd>
				<p>Windows Vista introduced some changes to the resource model with "RC Config" and MUI files. Resourcer is aware of these changes and can work around them to achieve the results you're after.</p>
			</dd>
			<dt>Extensible</dt>
			<dd>
				<p>If there's a resource data type that Resourcer doesn't support, you can code your own handler and get Resourcer to load it.</p>
			</dd>
		</dl>
		
	</div>
	
	<h2 id="faq">FAQ</h2>
	<div class="section">
		
		<dl>
			
			<dt>"ResHacker is many times more popular and is well-known, why should I use Resourcer instead?"</dt>
			<dd>
				<p>ResHacker hasn't been updated since 2002 and its development is officially on hold, it also doesn't support x64 executables or PNG icons. Resourcer is open-source (GPL on CodePlex) and under active development. For more reasons here's a table:</p>
				<table>
					<thead>
						<tr><th>Feature</th><th>ResHacker</th><th>Resourcer</th></tr>
					</thead>
					<tbody>
						<tr><td>License</td>                 <td>Closed Source</td> <td>GPLv2</td></tr>
						<tr><td>x64 Support</td>             <td>Crashes</td>       <td>Fully Supported</td></tr>
						<tr><td>Vista MUI Aware</td>         <td>No</td>            <td>Yes</td></tr>
						<tr><td>PNG Icon Support</td>        <td>Crashes</td>       <td>Yes</td></tr>
						<tr><td>Thumbnail View</td>          <td>No</td>            <td>Yes</td></tr>
						<tr><td>Batch Export</td>            <td>No</td>            <td>Yes</td></tr>
						<tr><td>Intelligent Icon Merging</td><td>No</td>            <td>Yes</td></tr>
						<tr><td>Extensible</td>              <td>No</td>            <td>Yes</td></tr>
					</tbody>
				</table>
				
				<p>In the interests of honesty, there are some features that ResHacker supports that Resourcer does not (yet):</p>
				
				<table>
					<thead>
						<tr><th>Feature</th><th>ResHacker</th><th>Resourcer</th></tr>
					</thead>
					<tbody>
						<tr><td>Batch Files</td>                                        <td>Yes</td><td>No (use *.cmd files to call Resourcer)</td></tr>
						<tr><td>RC Script Generation</td>                               <td>Yes</td><td>No (save to RES and use Visual Studio to generate the RC)</td></tr>
						<tr><td>Delphi Form Resource Support</td>                       <td>Yes</td><td>No</td></tr>
						<tr><td>Load Resources from a RES file for batch operations</td><td>Yes</td><td>No (data must be in individual files)</td></tr>
						
					</tbody>
				</table>
				
				<br />
			</dd>
			
			<dt>"I have a file which I know contains certain resources, yet they aren't listed. What's up?"</dt>
			<dd>
				<p>Some programs, such as those developed with Delphi, store their resources inside other resources. If a program has been written in Delphi then you'll find various resources under the "RCDATA" type, these resources define the appearance of windows and forms and contain images and other data encoded directly. Resourcer does not currently process Delphi form resources, but it will do in future.</p>
				<p>Other programs, such as that use the CLR (aka .NET Framework) or Java, store their resources differently. Because the CLR and Java are both cross-platform there's no use in storing resources in a Windows-specific fashion. The CLR has this notion of "resource streams" that are data files contained within a CLR Assembly, these streams can either be arbitrary files or a "ResourceSet": a strongly-typed collection of resources. Java programs store their resources inside JAR files, which are essentially zip files. To view Java resources there are numerous free Java resource editors available (or just rename the JAR file to *.ZIP and extract as usual). To view CLR resources you can download "Lutz Roeder's Resourcer", note that CLR resources are read-only.</p>
				<p>Your file might have been compressed using an EXE compressor like UPX, in which case you'll need to decompress it first.</p>
			</dd>
			
			<dt>"How do I view resources in an executable that has been UPX compressed?"</dt>
			<dd>
				<p>Until Resourcer adds in support for UPX compressed EXEs, you will need to download the UPX program yourself, then run it with these arguments: <code>upx -d -o "Decompressed.exe" "Compressed.exe"</code>. Then open "Decompressed.exe" in Resourcer and it should work fine. Just remember to UPX-compress it when you're done.</p>
			</dd>
		</dl>
		
	</div>
	
	<h2 id="cli">Command-Line Reference</h2>
	<div class="section">
		
		<p>Anolis Resourcer supports command-line arguments for GUI-free resource editing. A proper command-line program is in the works, but this should do you fine for now.</p>
		<p>A error message box will appear if the operation was unsuccessful, otherwise it terminates with error 0 (aka "OK")</p>
		
	</div>
	
	<h3>Command-Line Syntax</h3>
	<div class="section">
		
		<p>Resourcer has five arguments you can specify:</p>
		<table>
			<thead>
				<tr>
					<th>Argument</th>
					<th>Value</th>
					<th>Description</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>-op:</td>
					<td>add, upd, ext, del</td>
					<td><strong>Required.</strong> The operation to perform (Add, Update, Extract, or Delete respectively).</td>
				</tr>
				
				<tr>
					<td>-src:</td>
					<td>Path to a file</td>
					<td><strong>Required.</strong> The Win32 PE or RES file to modify or extract resources from.</td>
				</tr>
				
				<tr>
					<td>-type:</td>
					<td>Resource type identifier</td>
					<td><strong>Required.</strong> Identifies the type of resource to work with. For string and integer identifiers just putting the value is sufficient. Note that some string values are synonymous with some integer values. Consult the table below.</td>
				</tr>
				
				<tr>
					<td>-name:</td>
					<td>Resource name identifier</td>
					<td><strong>Required.</strong> Identifies the name of resource to work with. For string and integer identifiers just putting the value is sufficient. If a resource has a numeric string identifier then prefix the number with <code>\"</code> (backslash, followed by a double-quote) E.g.: -name:\"0. If a resource identifier starts with a double-quote symbol (unlikely) prefix it with <code>\"\"</code>.</td>
				</tr>
				
				<tr>
					<td>-lang:</td>
					<td>Unsigned 16-bit number.</td>
					<td><strong>Required, except when updating or deleting.</strong> This argument is required for adding and extracting, but optional for deleting and updating. If this argument is ommited then all matching resources will be deleted or replaced with the contents of the specified file.</td>
				</tr>
				
				<tr>
					<td>-file:</td>
					<td>Path to a file</td>
					<td><strong>Required, except when deleting.</strong> When adding or updating a resource the data is retrieved from this file. When extracting the resource is saved to this file. When deleting this argument is ignored.</td>
				</tr>
				
			</tbody>
		</table>
		
		<p>Notable Resource Type Identifiers</p>
		
		<table>
			<thead>
				<tr>
					<th style="width: 10em;">Type</th>
					<th>Integer</th>
					<th>Synonyms</th>
					<th>Notes</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>Cursor Sub-Image</td>
					<td>1</td>
					<td></td>
					<td>Cursors rarely have more than 1 sub-image. Replace cursors by altering the directory, not the individual subimages.</td>
				</tr>
				<tr>
					<td>Bitmap Data</td>
					<td>2</td>
					<td>"Bitmap", "BMP"</td>
					<td>Only *.bmp files can be read into a bitmap resource, you must convert from JPEG, GIF, or PNG first.</td>
				</tr>
				<tr>
					<td>Icon Sub-Image</td>
					<td>3</td>
					<td></td>
					<td>Icons contain many subimages. It is not advisable to replace them directly. If you are going to replace them, ensure you have the right DIB format (dimensions and pixelformat) first.</td>
				</tr>
				<tr>
					<td>Cursor Directory</td>
					<td>12</td>
					<td>"Cursor", "Cursordir", "Cursorgroup"</td>
					<td></td>
				</tr>
				<tr>
					<td>Icon Directory</td>
					<td>14</td>
					<td>"Icon", "Icondir", "Icongroup"</td>
					<td></td>
				</tr>
			</tbody>
		</table>
		
		<p>Other type IDs exist but are not listed. Consult MSDN or the Anolis source (Anolis.Core\Core\ResourceIdentifier.cs) for an exhaustive list.</p>
		
	</div>
	
	<h3>Examples</h3>
	<div class="section">
		
		<p>Add a new resource from a file:</p>
		<pre>Resourcer -op:add -src:"C:\exeToModify.exe" -type:icon -name:name -lang:1033 -file:"C:\iconToAdd.ico"</pre>
		
		<p>Update an existing resource with data from a file:</p>
		<pre>Resourcer -op:upd -src:"C:\exeToModify.exe" -type:icon -name:name -lang:1033 -file:"C:\newIcon.ico"</pre>
		
		<p>Update all existing resource languages with the specified type and name with data from a file:</p>
		<pre>Resourcer -op:upd -src:"C:\exeToModify.exe" -type:icon -name:name -file:"C:\newIcon.ico"</pre>
		
		<p>Extract a resource and save it to a file:</p>
		<pre>Resourcer -op:ext -src:"C:\exeToLoad.exe" -type:icon -name:name -lang:1033 -file:"C:\iconToSaveTo.ico"</pre>
		
		<p>Delete a resource:</p>
		<pre>Resourcer -op:del -src:"C:\exeToModify.exe" -type:icon -name:name -lang:1033</pre>
		
	</div>
	
	<h2 id="links">Links and Feedback</h2>
	<div class="section">
		
		<ul>
			<li><a href="http://anol.is"            >Anolis Homepage</a></li>
			<li><a href="http://anolis.codeplex.com">Anolis at CodePlex</a></li>
			<li><a href="http://anol.is/forums"     >Anolis Discussion Forum</a></li>
		</ul>
		
	</div>
	
	
</body>
</html>
